﻿using Pay.Window.Data.Dto;
using Pay.Window.Data.Utilitys;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Pay.Window.Data
{
    public partial class TestForm : Form
    {
        WebBrowser web = new WebBrowser();
        private static readonly string htmlFilePath = @"d:\表格数据.html.txt";
        public TestForm()
        {
            InitializeComponent();

            var reg = new Regex("[^0-9 .:]");
            var regStr = "2018.07.24 \r\n\r\n05:25";
            var str = reg.Replace(regStr, "");
        }

        private void TestForm_Load(object sender, EventArgs e)
        {
            web.DocumentCompleted += Web_DocumentCompleted;
            web.ScriptErrorsSuppressed = true;

            var htmlStr = File.ReadAllText(htmlFilePath);
            web.DocumentText = htmlStr;
        }

        private void Web_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            var orders = WebHelper.GetAlipayNewOrders("ddv", web);
        }

    }
}
